import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("fa_cms_comment",{schema:"fastadmin" } )
@Index("post_id",["aid","pid",])
export class fa_cms_comment {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"user_id"
        })
    user_id:number;
        

    @Column("enum",{ 
        nullable:false,
        default: () => "'archives'",
        enum:["archives","page","special"],
        name:"type"
        })
    type:string;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"aid"
        })
    aid:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"pid"
        })
    pid:number;
        

    @Column("text",{ 
        nullable:true,
        name:"content"
        })
    content:string | null;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"comments"
        })
    comments:number;
        

    @Column("varchar",{ 
        nullable:false,
        length:50,
        name:"ip"
        })
    ip:string;
        

    @Column("varchar",{ 
        nullable:false,
        name:"useragent"
        })
    useragent:string;
        

    @Column("tinyint",{ 
        nullable:false,
        default: () => "'0'",
        name:"subscribe"
        })
    subscribe:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"createtime"
        })
    createtime:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"updatetime"
        })
    updatetime:number;
        

    @Column("enum",{ 
        nullable:false,
        default: () => "'normal'",
        enum:["normal","hidden"],
        name:"status"
        })
    status:string;
        
}
